package com.ougy.reshop.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("switch")
@Scope("prototype")
public class SwitchPlaceAction extends BaseAction{
	private Logger logger=Logger.getLogger(getClass());

	@Override
	public String execute() throws Exception {
		HttpServletRequest request=	ServletActionContext.getRequest();
		String cityStr=(String)request.getAttribute("city_id");
		if(cityStr==null||cityStr.equals("")){
			return "success";
		}else{
			String cityName=sRegion.getName(Integer.parseInt(cityStr));
			logger.debug(cityName);
			return "success";
		}
	}
}
